<?php

namespace App\Http\Controllers\Admin;

use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
use Gregwar\Captcha\CaptchaBuilder;
use Gregwar\Captcha\PhraseBuilder;
use Mews\Captcha;

class HomeController extends Controller
{
    //


    public function index()
    {
        echo 'dddd';

       // return view('admin.home.index');
    }

    public function login()
    {
        $builder = new CaptchaBuilder();
        $builder->build(150,32);
        $phrase = $builder->getPhrase();

         ob_clean();
        return response($builder->output())->header('Content-type','image/jpeg');



//        if (Auth::guard('admin')->check())
//        {
//            return redirect('/admin');
//        }
//        return view('admin.login');
    }

    public function sign_in()
    {
//        $account = request('account');
//        $password = request('password');
//        $remember = request('remember') == 'on';
//        if (Auth::guard('admin')->attempt(['name' => $account, 'password' => $password], $remember))
//        {
//            return responseMsg(true, '��¼�ɹ�');
//        }
//        return responseMsg(false, '�û������������');
    }

    public function logout()
    {
//        Auth::guard('admin')->logout();
//        return redirect('/admin');
    }
}
